ValidationBackedNumberFieldWidget

constructor(width: Int, height: Int, wrappedValue: Supplier<T>, choiceValidator: ChoiceValidator<T>, validationProvider: Function<Double, ValidationResult<T>>, applier: Consumer<T> = Consumer { _ ->})

Parameters

T
width

Int - width of the text field

height

Int - height of the text field

wrappedValue

Supplier - supplier of the value to display on the text field. This is separate from any values stored within the widget, and generally is the same source as the applier, so this widget is updated if any external changes are made to the number

choiceValidator

ChoiceValidator - additional choice validation, if any. Generally this can be ChoiceValidator.any

validationProvider

FunctionValidationResult> - validates the number entered. all numbers entered are treated as doubles internally until application.

applier

Consumer - accepts results from valid user entries